﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Company_PrePrintPrice : System.Web.UI.Page, IAccess
{
    string action = "";
    protected string url = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        CurrentAccount.CheckSessionTimeOut(this);
        action = (Request["action"] ?? string.Empty).ToLower();

        if (string.IsNullOrEmpty(CurrentAccount.BidPwd))
        {
            Response.Redirect(string.Format("CheckBidPwd.aspx?action={0}", action));
        }
        if (!CurrentAccount.IsConfirmBid)
        {
            HZ.Web.MessageBox.Show("必须先确认报价！");
            Response.Redirect(string.Format("ConfirmBid.aspx?action={0}", action));
        }
        switch (action)
        {
            case "bargain":

                CompanyNavigation1.BidType = HZ.BidSystem.Model.BidType.Bargain;
                break;
            case "compete":
                CompanyNavigation1.BidType = HZ.BidSystem.Model.BidType.Compete;
                break;
            default:
                CompanyNavigation1.BidType = HZ.BidSystem.Model.BidType.Bid;
                break;
        }
        url = string.Format("PrintPrice.aspx?action={0}", action);
        HZ.BidSystem.BLL.BLL_Cache.SetOnlineModel(CurrentAccount.Account.AccountId.Value, new HZ.BidSystem.Model.OnLineModel() { Active = "准备打印" });
    }
    #region IAccess Members

    IList<EnumAccess> IAccess.AccessList
    {
        get
        {
            var list = new List<EnumAccess>();
            list.Add(EnumAccess.Company);
            return list;
        }

    }

    #endregion
}
